import request from '@/utils/request'

// 查询收文列表
export function listReceiptProcessSheet(query) {
  return request({
    url: '/system/message/list',
    method: 'post',
    params: query
  })
}

// 新增并启动流程收文
export function addReceiptProcessSheet(data) {
  return request({
    url: '/system/message/applicant',
    method: 'post',
    data: data
  })
}

// 新增/编辑收文
export function addEditReceiptProcessSheet(data) {
  return request({
    url: '/system/message/add',
    method: 'post',
    data: data
  })
}

// 收文详情
export function detailsReceiptProcessSheet(query) {
  return request({
    url: '/system/message/query',
    method: 'get',
    params: query
  })
}

// 收文启动流程
export function startReceiptProcessSheet(query) {
  return request({
    url: '/system/message/submitMessage',
    method: 'post',
    params: query
  })
}

// 收文处理审批办理
export function approvalListReceiptProcessSheet(query) {
  return request({
    url: '/system/message/showVerifyDialog',
    method: 'get',
    params: query
  })
}

// 收文流程审批处理提交
export function submitReceiptProcessSheet(query) {
  return request({
    url: '/system/message/complete',
    method: 'get',
    params: query
  })
}

// 收文流程承办人处理提交
export function cbrSubmitReceiptProcessSheet(query) {
  return request({
    url: '/system/message/undertake',
    method: 'get',
    params: query
  })
}

// 收文流程归档处理提交
export function fileSubmitReceiptProcessSheet(query) {
  return request({
    url: '/system/message/keepFile',
    method: 'get',
    params: query
  })
}

// 删除收文
export function delReceiptProcessSheet(query) {
  return request({
    url: '/system/message/remove',
    method: 'post',
    params: query
  })
}

// 导出呈批件
export function exportReceiptProcessSheet(modelId) {
  return request({
    url: '/system/modeler/export/'+modelId,
    method: 'get',
  })
}

// 获取单位列表信息
export function deptReceiptProcessSheet() {
  return request({
    url: '/system/message/dept',
    method: 'post',
  })
}

// 打印呈批件
export function printReceiptProcessSheet(query) {
  return request({
    url: '/system/message/print',
    method: 'get',
    params: query
  })
}
